<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>返回所有已定义的 traits 的数组</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.get-declared-interfaces.html">get_declared_interfaces</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.get-object-vars.html">get_object_vars</a></div>
 <div class="up"><a href="ref.classobj.html">类/对象 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.get-declared-traits" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">get_declared_traits</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.4.0)</p><p class="refpurpose"><span class="refname">get_declared_traits</span> &mdash; <span class="dc-title">返回所有已定义的 traits 的数组</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.get-declared-traits-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><strong>get_declared_traits</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">

  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.get-declared-traits-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.get-declared-traits-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回一个数组，其值包含了所有已定义的 traits 的名称。
   在失败的情况下返回 <strong><code>NULL</code></strong>。
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.get-declared-traits-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.class-uses.html" class="function" rel="rdfs-seeAlso">class_uses()</a> - Return the traits used by the given class</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.get-declared-interfaces.html">get_declared_interfaces</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.get-object-vars.html">get_object_vars</a></div>
 <div class="up"><a href="ref.classobj.html">类/对象 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
